feat: check ARG_MAX on Unix platforms#138439
Merged
bors merged 3 commits intorust-lang:masterfrom Mar 15, 2025
Merged
Conversation
Collaborator
|
Some changes occurred in compiler/rustc_codegen_ssa |
weihanglo
commented
Mar 13, 2025
This comment has been minimized.
This comment has been minimized.
9934c6d to
b4e66b7
Compare
This comment has been minimized.
This comment has been minimized.
jieyouxu
reviewed
Mar 13, 2025
This comment has been minimized.
This comment has been minimized.
Member
|
You probably need to declare a |
jieyouxu
reviewed
Mar 13, 2025
jieyouxu
reviewed
Mar 13, 2025
This comment has been minimized.
This comment has been minimized.
Member
|
|
Member
|
I would consider restructuring this bit like #[cfg(windows)]
{
// but make sure this returns
}
#[cfg(unix)]
{
// but make sure this returns
}
falseto avoid having both the |
Contributor
|
Helping @weihanglo work on this |
Collaborator
|
☔ The latest upstream changes (presumably #138480) made this pull request unmergeable. Please resolve the merge conflicts. |
This also updates the estimate on Windows of the length argument list to `saturating_add` to avoid overflow.
Though I doubt anyone running rustc outside Unix/Windows
On Unix the limits can be gargantuan anyway so we're pretty unlikely to hit them, but might still exceed it. We consult ARG_MAX here to get an estimate.
Member
Author
|
@rustbot ready |
Member
|
@bors r+ rollup |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 15, 2025
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#138283 (Enforce type of const param correctly in MIR typeck) - rust-lang#138439 (feat: check ARG_MAX on Unix platforms) - rust-lang#138502 (resolve: Avoid some unstable iteration) - rust-lang#138514 (Remove fake borrows of refs that are converted into non-refs in `MakeByMoveBody`) - rust-lang#138524 (Mark myself as unavailable for reviews temporarily) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 15, 2025
Rollup merge of rust-lang#138439 - weihanglo:argmax, r=jieyouxu feat: check ARG_MAX on Unix platforms On Unix the limits can be gargantuan anyway so we're pretty unlikely to hit them, but might still exceed it. We consult ARG_MAX here to get an estimate. Fixes rust-lang#138421 r? `@jieyouxu`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Unix the limits can be gargantuan anyway so we're pretty unlikely to hit them, but might still exceed it.
We consult ARG_MAX here to get an estimate.
Fixes #138421
r? @jieyouxu